﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace State_模式
{
    internal class ConcreteStateA : State
    {
        public override void Handel(Context context)
        {
        
            context.State=new ConcreteStateB();
        }
    }

    internal class ConcreteStateB : State
    {
        public override void Handel(Context context)
        {
    
            context.State = new ConcreteStateA();
        }
    }
}
